<?php
  // Global variables.
  $globalTableName = "factoids";

  // Do not change the following variables
  $sqlwherequery = "";
  $postSearchValue = "";
  $postSearchCriteria = "";
  $postStatusValue = "";
  $postAvailabilityValue = "";
  $postOrderByOrder = "";
  $postOrderByColumn = "";
  $postCurrentPage = "";
  $postExactMatch = "";
  $postAction = "";
  $httpUsername = "";

  while (list($key,$value) = each($_POST)) {
    if ($key == "search_value") {
      $postSearchValue = $value;
    } else if ($key == "search_criteria") {
      $postSearchCriteria = $value;
    } else if ($key == "status") {
      $postStatusValue = $value;
    } else if ($key == "availability") {
      $postAvailabilityValue = $value;
    } else if ($key == "orderby_order") {
      $postOrderByOrder = $value;
    } else if ($key == "orderby_column") {
      $postOrderByColumn = $value;
    } else if ($key == "currentpage") {
      $postCurrentPage = $value;
    } else if ($key == "match_type") {
      $postExactMatch = $value;
    } else if ($key == "action") {
      $postAction = $value;
    }
  }

  $postID = "";
  $postAction = "";
  $postFactoidValue = "";

  foreach($_POST as $key => $value) {
    if ($key == "id") {
      $postID = $value;
    } else if ($key == "action") {
      $postAction = $value;
    } else if ($key == "factoidValue") {
      $postFactoidValue = $value;
    }
  }
?>
